<template>
	<sw-form-frame v-model="visible" :title="formName" width="560" :type="formType" :loading="btnLoading" footer @submit="handleSubmitForm()">
		<el-form ref="form" size="medium" :model="formData" :rules="formRules" label-width="100px" class="library_type_form">
			<el-form-item label="库类型名称" prop="name">
				<el-input type="input" v-model="formData.name" maxlength="64" show-word-limit></el-input>
			</el-form-item>
			<el-form-item label="库类型排序" prop="sort">
				<el-input-number v-model="formData.sort" controls-position="right"></el-input-number>
			</el-form-item>
			<el-form-item label="库类型描述" prop="content">
				<el-input type="textarea" v-model="formData.content" autocomplete="off"></el-input>
			</el-form-item>
		</el-form>
	</sw-form-frame>
</template>

<script>
import formMixins from '@/mixins/formMixins';
import { queryLibraryType, addedLibraryType, updateLibraryType } from '@/api/platform/tbNetLibrary';
export default {
	mixins: [formMixins],
	data() {
		return {
			formName: '库类型',
			formRules: {
				name: [{ required: true, message: '请输入资源库类型名称', trigger: 'blur' }]
			}
		};
	},
	computed: {
		detailData() {
			return eval(queryLibraryType);
		},
		callFunction() {
			return eval(this.addOrEdit ? addedLibraryType : updateLibraryType);
		}
	},
	methods: {}
};
</script>
